/**
 * file: Result.java
 */

package pcsd;

import java.io.Serializable;

/**
 * Result class.
 * 
 * This class encapsulates the information regarding the result of executing a
 * task.
 * 
 * @author Tim van Deurzen
 */
public class Result implements Serializable {

	/**
	 * Bullshit variable ;-)
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * The result status.
	 */
	public int status;

	/**
	 * A string representing the output of the task.
	 */
	public String output;

	/**
	 * Construct a result object.
	 * 
	 * @param status
	 *            The result status.
	 * @param output
	 *            The logging string.
	 */
	public Result(int status, String output) {
		this.output = output;
		this.status = status;
	}

	/**
	 * Construct a result object without output (e.g., when task returns an
	 * error status).
	 * 
	 * This constructor should provide a standard log message.
	 * 
     * @param status The result status.
	 */
	public Result(int status) {
		this(status, "ERROR: " + status);
	}
}
